#pragma once
#ifndef __GUIDUTIL_H__
#define __GUIDUTIL_H__

#include "Util.h"
#include "Config.h"

namespace WindGE
{
	struct guid_data
	{
		unsigned long  data1;
		unsigned short data2;
		unsigned short data3;
		unsigned char  data4[8];
	};

	class WIND_CORE_API guid
	{
	public:
		guid();
		guid(const std::string& idstr);

		bool equal(const guid& guid);
		bool equal(guid_ptr guid);

		inline const guid_data& get_iddata()  const { return id_;	 }
		inline const std::string& get_idstr() const { return idstr_; }

	private:
		void generator();
		void tostring();
		bool guid_equal(const guid_data& id1, const guid_data& id2);
		
	private:
		guid_data		id_;
		std::string		idstr_;
	};
}

#endif // !__GUIDUTIL_H__


